{extend name="public/layout"/}
{block name="title"}{$currentInfo.name}{/block}
{block name="head"}{/block}
{block name="body"}
<section class="mc-view-box">
  {include file="public/index_header"/}
  <div class="mc-scrollview">
    <form action="" id="search-form">
      <input type="hidden" name="class_id"  value="{$Request.param.class_id}">
    </form>
    <div class="mescroll" id="mescroll">
      <div class="case-page-list" id="mescroll-content"></div>
    </div>
  </div>
  {include file="public/index_footer" /}
</section>
{/block}
{block name="script"}
<script type="text/html" id="list-tpl">
  {@each data as value}
  <a href="/home/cms/info.html?id=${value.id}&class_id=${value.class_id}" class="case-item p-d">
    <div class="case-thumb" style="background-image:url(${value.thumb})"></div>
    <div class="">
      <div class="case-title">${value.title}</div>
      <div class="case-desc">${value.desc}</div>
    </div>
  </a>
  {@/each}
</script>
<script>
  $(function () {
    swiper.init();
    doAction.getlist();
  });
  var doAction = {
    getlist:function () {
      helper.mescroll('mescroll',{
        callback: function (page,mescroll) {
          helper.getAjax({
            url: '/home/cms/getPagelist.html?pageNumber=' + page.num + '&pageSize=' + page.size,
            data:helper.getSearchParams(),
            success: function (curPageData) {
              mescroll.endBySize(curPageData.rows.length, curPageData.total);
              var html = juicer($('#list-tpl').html(),{data:curPageData.rows});
              $('#mescroll-content').append(html);
            }, error:function (e) {
              mescroll.endErr();
            }
          });
        }
      });
    },
  }
</script>
{/block}